Skip to content

Conversation

mrlopezco
Copy link

@mrlopezco mrlopezco commented Sep 4, 2025

The endpoint was wrong.
Community already discussed this here
gitroomhq/postiz-n8n#4

Summary by CodeRabbit

  • Documentation
    • Updated Public API docs for self-hosted deployments: the base URL now uses https://{NEXT_PUBLIC_BACKEND_URL}/api/ instead of https://{NEXT_PUBLIC_BACKEND_URL}/public/v1.
    • Adjusted examples and guidance to reflect the new base path.
    • Clarified that all other Public API content remains unchanged.
    • No functional or interface changes; this is a documentation-only update.

The endpoint was wrong.
Community already discussed this here
gitroomhq/postiz-n8n#4
Copy link

vercel bot commented Sep 4, 2025

@mrlopezco is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

coderabbitai bot commented Sep 4, 2025

Walkthrough

Updates Public API docs: changes the self-hosted base URL from https://{NEXT_PUBLIC_BACKEND_URL}/public/v1 to https://{NEXT_PUBLIC_BACKEND_URL}/api/. No other content or exported/public declarations changed.

Changes

Cohort / File(s) Summary
Docs: Public API base URL
pages/public-api.mdx
Replaced self-hosted base URL https://{NEXT_PUBLIC_BACKEND_URL}/public/v1 with https://{NEXT_PUBLIC_BACKEND_URL}/api/. All other content unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Update public-api.mdx #99 — Also modifies public-api.mdx, affecting endpoint paths consistent with the /public/v1 → /api/ change.

Suggested reviewers

  • egelhaus

Poem

A hop, a bop, a tiny tweak—
I nudge the docs, so clean and sleek.
From /public/v1 to /api/ we go,
Carrots aligned, endpoints in a row.
Thump-thump says the change is right—
Ship it fast, then moonlight night. 🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
pages/public-api.mdx (2)

44-46: Show self-hosted variants or define a shared BASE_URL to avoid path confusion.

All endpoint examples use the hosted base (https://api.postiz.com/public/v1/...). With the new self-hosted base at /api, paths differ (no /public/v1). This can lead to copy/paste errors for self-hosted users.

Consider defining a single {BASE_URL} near the top:

  • Hosted: https://api.postiz.com/public/v1
  • Self-hosted: https://{NEXT_PUBLIC_BACKEND_URL}/api

Then update examples to:

GET {BASE_URL}/integrations
POST {BASE_URL}/upload
GET {BASE_URL}/posts?startDate=...&endDate=...
POST {BASE_URL}/posts
DELETE {BASE_URL}/posts/:id
POST {BASE_URL}/generate-video
POST {BASE_URL}/video/function

Optionally, add a brief note under each block showing both concrete forms (hosted vs self-hosted).

Also applies to: 73-75, 99-100, 139-140, 236-237, 254-255, 284-285


71-71: Typo: “from-data” → “form-data”.

This is user-facing; fix to avoid confusion about multipart uploads.

-### Upload a new file (from-data)
+### Upload a new file (form-data)
🧹 Nitpick comments (1)
pages/public-api.mdx (1)

26-26: Clarify if rate limits apply to self-hosted.

State whether the “30 requests per hour” limit is enforced only on the hosted API or also by default in self-hosted deployments.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5fb87c9 and 3a68f34.

📒 Files selected for processing (1)
  • pages/public-api.mdx (1 hunks)
🔇 Additional comments (1)
pages/public-api.mdx (1)

21-23: Verify Authorization header scheme.

Docs say Authorization: {apiKey}. Many APIs use Authorization: Bearer {apiKey}. Please confirm the exact scheme to prevent failed requests and update examples accordingly.

With each request you need to pass the API Key in the header `Authorization: {apiKey}`.<br />
If you are using the hosted version of Postiz the URL will be `https://api.postiz.com/public/v1`.<br />
If you are self-hosting Postiz the URL will be `https://{NEXT_PUBLIC_BACKEND_URL}/public/v1`.<br />
If you are self-hosting Postiz the URL will be `https://{NEXT_PUBLIC_BACKEND_URL}/api/`.<br />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Clarify self-hosted base URL (trailing slash + scheme duplication).

  • Drop the trailing slash to avoid double slashes when composing paths.
  • Confirm whether NEXT_PUBLIC_BACKEND_URL already includes the scheme. If yes, remove the hardcoded https:// prefix here to prevent https://https://... issues.

Apply this minimal edit:

-If you are self-hosting Postiz the URL will be `https://{NEXT_PUBLIC_BACKEND_URL}/api/`.<br />
+If you are self-hosting Postiz the base URL will be `https://{NEXT_PUBLIC_BACKEND_URL}/api`.<br />
+<br />
+Tip: If `NEXT_PUBLIC_BACKEND_URL` already includes the scheme (e.g., `https://postiz.example.com`), prefer `{NEXT_PUBLIC_BACKEND_URL}/api` without adding another `https://`.

🏁 Script executed:

#!/bin/bash
set -e
echo "🔍 Searching for NEXT_PUBLIC_BACKEND_URL occurrences:"
rg -n "NEXT_PUBLIC_BACKEND_URL" || true

echo
echo "📄 Listing environment example files:"
fd --hidden --max-depth 2 --type f .env* || true

Length of output: 919


🏁 Script executed:

#!/bin/bash
set -e
rg -n -C3 "NEXT_PUBLIC_BACKEND_URL" pages/configuration/reference.mdx

Length of output: 207


Clarify self-hosted base URL usage (avoid duplicate schemes and trailing slash)

Drop the trailing slash and guide users on when to include the https:// prefix:

-file: pages/public-api.mdx:24
-If you are self-hosting Postiz the URL will be `https://{NEXT_PUBLIC_BACKEND_URL}/api/`.<br />
+If you are self-hosting Postiz the base URL is `https://{NEXT_PUBLIC_BACKEND_URL}/api`.<br />
+
+Tip: if `NEXT_PUBLIC_BACKEND_URL` already includes `https://` (for example, `https://postiz.example.com`), use `{NEXT_PUBLIC_BACKEND_URL}/api` without an extra `https://`.  
🤖 Prompt for AI Agents
In pages/public-api.mdx around line 24, update the example URL text to remove
the trailing slash and add guidance about the scheme: change the example to use
https://{NEXT_PUBLIC_BACKEND_URL}/api (no trailing slash) and add a short note
that users should include the scheme (https://) only if NEXT_PUBLIC_BACKEND_URL
does not already contain it to avoid duplicate schemes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant